package com.yzh.design.demo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 10~20号：3级审批
 * 11~20号：3级+2级审批
 * 因为是固定时间，所以若过期需要修改
 */
public abstract class AuthLink {
    protected Logger logger = LoggerFactory.getLogger(AuthLink.class);
    protected SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    protected String levelUserId;   //人员级别
    protected String userName;      //人员姓名
    private AuthLink next;          //责任链

    public AuthLink(String levelUserId, String userName) {
        this.levelUserId = levelUserId;
        this.userName = userName;
    }
    public AuthLink getNext() {
        return next;
    }

    public AuthLink setNext(AuthLink authLink) {
        this.next = authLink;
        return this;
    }

    public abstract AuthInfo doAuth(String uId, String orderId, Date date);
}
